//
//  SXUDPServer.h
//  SXUDPSDK
//
//  Created by admin on 2019/7/16.
//

#import <Foundation/Foundation.h>
#import "GCDAsyncUdpSocket.h"

NS_ASSUME_NONNULL_BEGIN

@interface SXUDPServer : NSObject<GCDAsyncUdpSocketDelegate>

+ (instancetype)sharedInstance;

-(BOOL)startServer;

-(BOOL)stopServer;

-(BOOL)socketIsOK;

-(BOOL)writeAndFlush_strS:(NSString *)ip port:(int)port dataStr:(NSString *)dataStr;
-(BOOL)writeAndFlush_strB:(NSString *)ip port:(int)port dataB:(NSData *)dataB;

@end

NS_ASSUME_NONNULL_END
